{%extends "issue_base.html"%}
{%block title1%}Issues for {{viewed_account.nickname}} -{%endblock%}
{%block body%}
<script language="JavaScript" type="text/javascript"><!--
document.onkeydown = M_dashboardKeyDown;
-->
</script>
<h2 style="display:inline">Issues for {{viewed_account.nickname}}</h2>
{%if show_block and viewed_account.blocked %}<a href="{%url codereview.views.block_user viewed_account.email%}">Unblock</a>{%endif%}
{%if show_block and not viewed_account.blocked %}<a href="{%url codereview.views.block_user viewed_account.email%}">Block</a>{%endif%}
<p>
<div class="issue-list">
  <table id="queues">

  {%if draft_issues%}
  <tr class="header draft">
    <td colspan="9" class="header">
      <h3>Issues with drafts by me</h3>
    </td>
  </tr>
  {%include "issue_heading.html"%}
  {%for issue in draft_issues%}
    {%include "issue_row.html"%}
  {%endfor%}
  {%endif%}

  <tr class="header incoming">
    <td colspan="9" class="header">
      <h3>Incoming reviews {%nickname email%} ({{review_issues|length}})</h3>
    </td>
  </tr>
  {%if not review_issues%}
    <tr>
      <td colspan="9" class="first last">
        <span class="disabled">(None)</span>
      </td>
    </tr>
  {%else%}
    {%include "issue_heading.html"%}
    {%for issue in review_issues%}
      {%include "issue_row.html"%}
    {%endfor%}
  {%endif%}

  <tr class="header outgoing">
    <td colspan="9" class="header">
      <h3>Outgoing reviews {%nickname email%} ({{outgoing_issues|length}})</h3>
    </td>
  </tr>
  {%if not outgoing_issues%}
    <tr>
      <td colspan="9" class="first last">
        <span class="disabled">(None)</span>
      </td>
    </tr>
  {%else%}
    {%include "issue_heading.html"%}
    {%for issue in outgoing_issues%}
      {%include "issue_row.html"%}
    {%endfor%}
  {%endif%}

  <tr class="header unsent">
    <td colspan="9" class="header">
      <h3>Unsent issues {%nickname email%} ({{unsent_issues|length}})</h3>
    </td>
  </tr>
  {%if not unsent_issues%}
    <tr>
      <td colspan="9" class="first last">
        <span class="disabled">(None)</span>
      </td>
    </tr>
  {%else%}
    {%include "issue_heading.html"%}
    {%for issue in unsent_issues%}
      {%include "issue_row.html"%}
    {%endfor%}
  {%endif%}

  <tr class="header cc">
    <td colspan="9" class="header">
      <h3>Issues CCd to {%nickname email%} ({{cc_issues|length}})</h3>
    </td>
  </tr>
  {%if not cc_issues%}
    <tr>
      <td colspan="9" class="first last">
        <span class="disabled">(None)</span>
      </td>
    </tr>
  {%else%}
    {%include "issue_heading.html"%}
    {%for issue in cc_issues%}
      {%include "issue_row.html"%}
    {%endfor%}
  {%endif%}

  <tr class="header closed">
    <td colspan="9" class="header">
      <h3>Closed Recently ({{closed_issues|length}})</h3>
    </td>
  </tr>
  {%if not closed_issues%}
    <tr>
      <td colspan="9" class="first last">
        <span class="disabled">(None)</span>
      </td>
    </tr>
  {%else%}
    {%include "issue_heading.html"%}
    {%for issue in closed_issues%}
      {%include "issue_row.html"%}
    {%endfor%}
  {%endif%}
  </table>
</div>

<script language="JavaScript" type="text/javascript"><!--
var dashboardState = new M_DashboardState(window,'issue', 'M_myDashboardIssueMarker');
-->
</script>
{%endblock%}
